package testgradle;

import java.util.Objects;

/**
 * @author miweidong
 * @date 2021-07-28 15:45
 */
public final class Mode {
    private final Integer age;
    private final String name;


    public Mode(Integer age, String name) {
        this.age = age;
        this.name = name;
    }



    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Mode mode = (Mode) o;
        return Objects.equals(age, mode.age) &&
                Objects.equals(name, mode.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(age, name);
    }

    @Override
    public String toString() {
        return "Mode{" +
                "age=" + age +
                ", name='" + name + '\'' +
                '}';
    }
}
